<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>订单管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/app/admin/component/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/app/admin/component/pear/css/pear.css" media="all">
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">订单号</label>
                            <div class="layui-input-inline">
                                <input type="text" name="order_no" placeholder="请输入订单号" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">会员</label>
                            <div class="layui-input-inline">
                                <input type="text" name="member_keyword" placeholder="会员卡号/姓名/手机" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">日期</label>
                            <div class="layui-input-inline">
                                <input type="text" name="date_range" id="date_range" placeholder="请选择日期范围" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn layuiadmin-btn-list" lay-submit lay-filter="LAY-order-search">
                                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                            </button>
                        </div>
                    </div>
                </div>

                <table id="LAY-order-list" lay-filter="LAY-order-list"></table>
            </div>
        </div>
    </div>

    <script src="/app/admin/component/layui/layui.js"></script>
    <script src="/app/admin/component/pear/pear.js"></script>
    <script>
    layui.use(['table', 'form', 'laydate'], function(){
        var $ = layui.$
        ,table = layui.table
        ,form = layui.form
        ,laydate = layui.laydate;
        
        //日期范围
        laydate.render({
            elem: '#date_range'
            ,range: true
        });
        
        //订单列表
        table.render({
            elem: '#LAY-order-list'
            ,url: '/app/ky_shouyin/order/list'
            ,cols: [[
                {type: 'checkbox', fixed: 'left'}
                ,{field: 'id', title: 'ID', width: 80, sort: true}
                ,{field: 'order_no', title: '订单号', width: 180}
                ,{field: 'amount', title: '金额', width: 100}
                ,{field: 'status', title: '状态', width: 100}
                ,{field: 'store_name', title: '门店', width: 120}
                ,{field: 'created_at', title: '创建时间', width: 160}
                ,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-order-operation'}
            ]]
            ,page: true
            ,limit: 15
            ,height: 'full-220'
            ,text: {
                none: '暂无数据'
            }
        });
    });
    </script>

    <script type="text/html" id="table-order-operation">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail"><i class="layui-icon layui-icon-form"></i>详情</a>
        {{# if(d.status == 1){ }}
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="cancel"><i class="layui-icon layui-icon-close"></i>取消</a>
        {{# } }}
    </script>
</body>
</html> 